<template>
  <div class="exam-all">
    <question-exam-page :fetcher="fetchQuestions" @click-row="toExamQuestion"></question-exam-page>
  </div>
</template>

<script>
import QuestionExamPage from '@/components/QuestionExamPage'
import api from '@/api'

export default {
  name: 'ExamAll',
  components: {
    QuestionExamPage
  },
  methods: {
    fetchQuestions(page) {
      return api.queryQuestionsWithExam(page)
    },
    toExamQuestion({ id }) {
      this.$router.push({
        name: 'exam-question',
        params: {
          id
        }
      })
    }
  }
}
</script>

<style>

</style>
